
<%@ page import="br.com.rise.leilao.Leilao" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />
        <g:set var="entityName" value="${message(code: 'leilao.label', default: 'Leilao')}" />
        <title><g:message code="default.show.label" args="[entityName]" /></title>
    </head>
    <body>
        <div class="nav">
            <span class="menuButton"><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></span>
            <span class="menuButton"><g:link class="list" action="list"><g:message code="default.list.label" args="[entityName]" /></g:link></span>
            <span class="menuButton"><g:link class="create" action="create"><g:message code="default.new.label" args="[entityName]" /></g:link></span>
        </div>
        <div class="body">
            <h1><g:message code="default.show.label" args="[entityName]" /></h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <div class="dialog">
                <table>
                    <tbody>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="leilao.id.label" default="Id" /></td>
                            
                            <td valign="top" class="value">${fieldValue(bean: leilaoInstance, field: "id")}</td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="leilao.produto.label" default="Produto" /></td>
                            
                            <td valign="top" class="value"><g:link controller="produto" action="show" id="${leilaoInstance?.produto?.id}">${leilaoInstance?.produto?.encodeAsHTML()}</g:link></td>
                            
                        </tr>
                        
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="produto.nome.label" default="Nome" /></td>
                            
                            <td valign="top" class="value">${fieldValue(bean: produtoInstance, field: "nome")}</td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="produto.descricao.label" default="Descricao" /></td>
                            
                            <td valign="top" class="value">${fieldValue(bean: produtoInstance, field: "descricao")}</td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><img src="${fieldValue(bean: produtoInstance, field: "imagem")}" />
                            <g:message code="produto.imagem.label" default="Imagem" /></td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="produto.categorias.label" default="Categorias" /></td>
                            
                            <td valign="top" style="text-align: left;" class="value">
                                <ul>
                                <g:each in="${produtoInstance?.categorias}" var="c">
                                    <li><g:link controller="categoria" action="show" id="${c.id}">${c?.encodeAsHTML()}</g:link></li>
                                </g:each>
                                </ul>
                            </td>
              
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="leilao.dataInicio.label" default="Data Inicio" /></td>
                            
                            <td valign="top" class="value"><g:formatDate format="dd/MM/yyyy" date="${leilaoInstance?.dataInicio}" /></td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="leilao.dataTermino.label" default="Data Termino" /></td>
                            
                            <td valign="top" class="value"><g:formatDate format="dd/MM/yyyy" date="${leilaoInstance?.dataTermino}" /></td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="leilao.valorInicial.label" default="Valor Inicial" /></td>
                            
                            <td valign="top" class="value">${fieldValue(bean: leilaoInstance, field: "valorInicial")}</td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="leilao.valorFinal.label" default="Valor Final" /></td>
                            
                            <td valign="top" class="value">${fieldValue(bean: leilaoInstance, field: "valorFinal")}</td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="leilao.leiloeiro.label" default="Leiloeiro" /></td>
                            
                            <td valign="top" class="value"><g:link controller="usuario" action="show" id="${leilaoInstance?.leiloeiro?.id}">${leilaoInstance?.leiloeiro?.encodeAsHTML()}</g:link></td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="leilao.dia.label" default="Dia" /></td>
                            
                            <td valign="top" class="value">${fieldValue(bean: leilaoInstance, field: "dia")}</td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="leilao.hora.label" default="Hora" /></td>
                            
                            <td valign="top" class="value">${fieldValue(bean: leilaoInstance, field: "hora")}</td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="leilao.minuto.label" default="Minuto" /></td>
                            
                            <td valign="top" class="value">${fieldValue(bean: leilaoInstance, field: "minuto")}</td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="leilao.lances.label" default="Lances" /></td>
                            
                            <td valign="top" style="text-align: left;" class="value">
                                <ul>
                                <g:each in="${leilaoInstance.lances}" var="l">
                                    <li><g:link controller="lance" action="show" id="${l.id}">${l?.encodeAsHTML()}</g:link></li>
                                </g:each>
                                </ul>
                            </td>
                            
                        </tr>
                    
                    </tbody>
                </table>
            </div>
            <div class="buttons">
                <g:form>
                    <g:hiddenField name="id" value="${leilaoInstance?.id}" />
                    <span class="button"><g:actionSubmit class="edit" action="edit" value="${message(code: 'default.button.edit.label', default: 'Edit')}" /></span>
                    <span class="button"><g:actionSubmit class="delete" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" /></span>
                </g:form>
            </div>
        </div>
    </body>
</html>
